/*! lzf */

var artForm = function () {
    function e(s) {
        var t = {}, n = [];
        return $(s).find("input").each(function () {
            if ("submit" != this.type && 0 == $(this).hasClass("not-post") && 0 == this.disabled && "none" != $(this).css("display") && "none" != $(this).parent().css("display") && "none" != $(this).parent().parent().css("display") && "none" != $(this).parent().parent().parent().css("display")) switch (this.type) {
                case"checkbox":
                    1 == this.checked && (this.name ? t[this.name] = this.value : n.push(this.value));
                    break;
                default:
                    t[this.name] = this.value
            }
        }), $(s).find("select").each(function () {
            0 == $(this).hasClass("not-post") && 0 == this.disabled && "none" != $(this).css("display") && "none" != $(this).parent().css("display") && "none" != $(this).parent().parent().css("display") && "none" != $(this).parent().parent().parent().css("display") && (t[this.name] = $.trim($(this).find("option:selected").val()))
        }), $(s).find("textarea").each(function () {
            0 == $(this).hasClass("not-post") && 0 == this.disabled && "none" != $(this).css("display") && (t[this.name] = $.trim(this.value))
        }), 0 < n.length && (t.items = n), t
    }

    return {
        validate: function (s, t, n) {
            $("#" + s).validate({
                rules: t.rules, messages: t.messages, onfocusin: function (s) {
                    $(s).valid()
                }, submitHandler: function (s) {
                    var t = e(s);
                    n(t, s, !1)
                }
            })
        }, getData: function (s) {
            return e(s)
        }
    }
}();